Use gtk_ascii_tolower/toupper instead of the C library variants. (#488918,
authorJohan Dahlin <jdahlin@async.com.br>
Mon, 22 Oct 2007 09:15:50 +0000 (09:15 +0000)
committerJohan Dahlin <johan@src.gnome.org>
Mon, 22 Oct 2007 09:15:50 +0000 (09:15 +0000)
2007-10-22  Johan Dahlin  <jdahlin@async.com.br>

* gtk/gtkbuilder.c: Use gtk_ascii_tolower/toupper instead of the C
library variants. (#488918, Sertaç Ö. Yıldız)

svn path=/trunk/; revision=18939

ChangeLog
gtk/gtkbuilder.c

index 15bf4d3ffde6925e82afe83b04ed6235cce544eb..994f62a711321864588f3981903852937bd95848 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-22  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gtk/gtkbuilder.c: Use gtk_ascii_tolower/toupper instead of the C 
+       library variants. (#488918, Sertaç Ö. Yıldız)
+
 2007-10-19  Tor Lillqvist  <tml@novell.com>
 
        * gdk/win32/gdkevents-win32.c (gdk_event_translate): Add a block
index f8770d9912b540c61508a2b6cd4ccaf1ddc19e89..5f4566dbe55b90d6b4909641b134ee9102ce8bfa 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 #include <config.h>
-#include <ctype.h> /* tolower, toupper */
 #include <errno.h> /* errno */
 #include <stdlib.h> /* strtol, strtoul */
 #include <string.h> /* strlen */
@@ -210,13 +209,13 @@ _gtk_builder_resolve_type_lazily (const gchar *name)
     {
       c = name[i];
       /* skip if uppercase, first or previous is uppercase */
-      if ((c == toupper (c) &&
-           i > 0 && name[i-1] != toupper (name[i-1])) ||
-          (i > 2 && name[i]   == toupper (name[i]) &&
-           name[i-1] == toupper (name[i-1]) &&
-           name[i-2] == toupper (name[i-2])))
+      if ((c == g_ascii_toupper (c) &&
+           i > 0 && name[i-1] != g_ascii_toupper (name[i-1])) ||
+          (i > 2 && name[i]   == g_ascii_toupper (name[i]) &&
+           name[i-1] == g_ascii_toupper (name[i-1]) &&
+           name[i-2] == g_ascii_toupper (name[i-2])))
         g_string_append_c (symbol_name, '_');
-      g_string_append_c (symbol_name, tolower (c));
+      g_string_append_c (symbol_name, g_ascii_tolower (c));
     }
   g_string_append (symbol_name, "_get_type");